package com.cdp.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cdp.common.core.domain.entity.SysSourceName;
import com.cdp.system.dto.SandTypeDTO;
import com.cdp.system.mapper.SysSourceNameMapper;
import com.cdp.system.service.ISysSourceNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysSourceNameServiceImpl extends ServiceImpl<SysSourceNameMapper, SysSourceName> implements ISysSourceNameService {

    @Autowired
    private SysSourceNameMapper sysSourceNameMapper;




    /**
     * 商家来源模糊查询
     * @param sandTypeDTO
     * @return
     */
    @Override
    public List<SysSourceName> listMistedSourceName(SandTypeDTO sandTypeDTO) {
        LambdaQueryWrapper<SysSourceName> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.like(SysSourceName::getSourceName,sandTypeDTO.getName());
        List<SysSourceName> sysSourceNameList = sysSourceNameMapper.selectList(queryWrapper);
        return sysSourceNameList ;
    }
}


